<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改')"/>
    <th:block th:include="include :: select2-css"/>
</head>
<body>
<div class="main-content">
    <form id="form-train-add" class="form-horizontal" AUTOCOMPLETE="OFF">
        <input id="eid" name="eid" class="form-control" type="hidden"/>
        <h4 class="form-header h4">基本信息</h4>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">工号：</label>
                    <div class="col-sm-8">
                        <input name="badge" id="badge" class="form-control" onclick="getEmp()" type="text"/>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">姓名：</label>
                    <div class="col-sm-8">
                        <input id="name" name="name" class="form-control" readonly="readonly" type="text"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">公司名称：</label>
                    <div class="col-sm-8">
                        <input id="compName" name="compName" class="form-control" readonly="readonly" type="text"/>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">部门名称：</label>
                    <div class="col-sm-8">
                        <input id="depName" name="depName" class="form-control" readonly="readonly" type="text"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">岗位名称：</label>
                    <div class="col-sm-8">
                        <input id="jobName" name="jobName" class="form-control" readonly="readonly" type="text"/>
                    </div>
                </div>
            </div>
        </div>
        <h4 class="form-header h4">新增信息</h4>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">入职前后?</label>
                    <div class="col-sm-8">
                        <select name="IsJoin" id="IsJoin" class="form-control m-b">
                            <option value="">请选择</option>
                            <option value="0">前</option>
                            <option value="1">后</option>
                        </select></div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">培训类型：</label>
                    <div class="col-sm-8">
                        <select name="TrainType" id="TrainType" class="form-control m-b"
                                th:with="type=${@dict.getType('tCD_TrainType')}">
                            <option value="">请选择</option>
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                    th:value="${dict.dictValue}"></option>
                        </select>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">培训形式:</label>
                    <div class="col-sm-8">
                        <select name="TrainKind" id="TrainKind" class="form-control m-b"
                                th:with="type=${@dict.getType('tCD_TrainKind')}">
                            <option value="">请选择</option>
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                    th:value="${dict.dictValue}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">培训主题：</label>
                    <div class="col-sm-8">
                        <input id="Content" name="Content"  class="form-control"  type="text"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">培训课程:</label>
                    <div class="col-sm-8">
                        <input id="Course" name="Course"  class="form-control"  type="text"/>

                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">开始时间：</label>
                    <div class="col-sm-8">
                        <input id="BeginDate" name="BeginDate"  class="form-control laydate-demo-4"  type="text"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">结束时间:</label>
                    <div class="col-sm-8">
                        <input id="EndDate" name="EndDate"  class="form-control laydate-demo-3"  type="text"/>

                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">举办机构：</label>
                    <div class="col-sm-8">
                        <input id="Vendor" name="Vendor" class="form-control"  type="text"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">培训地点:</label>
                    <div class="col-sm-8">
                        <input id="Place" name="Place"  class="form-control"  type="text"/>

                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">课时：</label>
                    <div class="col-sm-8">
                        <input id="Hours" name="Hours"  class="form-control"  type="text"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">所获证书:</label>
                    <div class="col-sm-8">
                        <input id="Certificate" name="Certificate"  class="form-control"  type="text"/>

                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">证书编号：</label>
                    <div class="col-sm-8">
                        <input id="CertificateNo" name="CertificateNo" class="form-control"  type="text"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">协议编号:</label>
                    <div class="col-sm-8">
                        <input id="AgreementNo" name="AgreementNo" class="form-control"  type="text"/>

                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">协议开始日期：</label>
                    <div class="col-sm-8">
                        <input id="Abegindate" name="Abegindate" class="form-control laydate-demo-2"  type="text"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">协议期:</label>
                    <div class="col-sm-8">
                        <input id="Aterm" name="Aterm"  class="form-control"  type="text"/>

                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">协议结束日期：</label>
                    <div class="col-sm-8">
                        <input id="Aenddate" name="Aenddate"  class="form-control laydate-demo-1"  type="text"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">培训费用:</label>
                    <div class="col-sm-8">
                        <input id="Expenses" name="Expenses"  class="form-control"  type="text"/>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>


<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: datetimepicker-js"/>

<script th:inline="javascript">

    var prefix = ctx + "bgInfo/train";

    $(function () {
        layui.use('laydate', function () {
            var laydate = layui.laydate;
            laydate.render({
                elem: '.laydate-demo-1',
                type: 'date'
            });
        });
        layui.use('laydate', function () {
            var laydate = layui.laydate;
            laydate.render({
                elem: '.laydate-demo-2',
                type: 'date'
            });
        });
        layui.use('laydate', function () {
            var laydate = layui.laydate;
            laydate.render({
                elem: '.laydate-demo-3',
                type: 'date'
            });
        });
        layui.use('laydate', function () {
            var laydate = layui.laydate;
            laydate.render({
                elem: '.laydate-demo-4',
                type: 'date'
            });
        });
    });


    function submitHandler() {
        if ($.validate.form()) {
            var data = $("#form-train-add").serializeArray();
            $.operate.save(prefix + "/add", data);
        }
    }

    function getEmp() {
        $.modal.open("选择添加培训经历人员", ctx + "bgInfo/getEmp");
    }
</script>
</body>
</html>
